package com.uzai.common.dto.base;

import com.uzai.common.utils.DateUtil;

import java.util.Date;

public class BizLog {
    private String id;
    private Long merId;
    private int deviceType;
    private int bizType;
    private Long deviceUniqueId;
    private String bizUserId;
    private Long userId;
    private String msgInfo;
    private int userRegTime;
    private Long inviteId;
    private Object data;
    private long logTime = System.currentTimeMillis();

    public BizLog() {
    }

    public BizLog(int bizType,
                  Long merId, int deviceType, Long deviceUniqueId,
                  String bizUserId, Long userId,
                  String msgInfo) {
        this.merId = merId;
        this.deviceType = deviceType;
        this.bizType = bizType;
        this.deviceUniqueId = deviceUniqueId;
        this.bizUserId = bizUserId;
        this.userId = userId;
        this.msgInfo = msgInfo;
    }

    public BizLog(int bizType,
                  Long merId, int deviceType,  Long deviceUniqueId,
                  String bizUserId, Long userId,
                  String msgInfo,int userRegTime,Object data) {
        this.merId = merId;
        this.deviceType = deviceType;
        this.bizType = bizType;
        this.deviceUniqueId = deviceUniqueId;
        this.bizUserId = bizUserId;
        this.userId = userId;
        this.msgInfo = msgInfo;
        this.userRegTime = userRegTime;
        this.data = data;
    }

    public BizLog(int bizType,
                  Long merId, int deviceType,  Long deviceUniqueId,
                  String bizUserId, Long userId,
                  String msgInfo,int userRegTime,Long inviteId,Object data) {
        this.merId = merId;
        this.deviceType = deviceType;
        this.bizType = bizType;
        this.deviceUniqueId = deviceUniqueId;
        this.bizUserId = bizUserId;
        this.userId = userId;
        this.msgInfo = msgInfo;
        this.userRegTime = userRegTime;
        this.inviteId = inviteId;
        this.data = data;
    }

    public BizLog(String id,int bizType,
                  Long merId, int deviceType,  Long deviceUniqueId,
                  String bizUserId, Long userId,
                  String msgInfo,int userRegTime,Long inviteId,Object data) {
        this.id = id;
        this.merId = merId;
        this.deviceType = deviceType;
        this.bizType = bizType;
        this.deviceUniqueId = deviceUniqueId;
        this.bizUserId = bizUserId;
        this.userId = userId;
        this.msgInfo = msgInfo;
        this.userRegTime = userRegTime;
        this.inviteId = inviteId;
        this.data = data;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getMerId() {
        return merId;
    }

    public void setMerId(Long merId) {
        this.merId = merId;
    }

    public int getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(int deviceType) {
        this.deviceType = deviceType;
    }

    public int getBizType() {
        return bizType;
    }

    public void setBizType(int bizType) {
        this.bizType = bizType;
    }

    public Long getDeviceUniqueId() {
        return deviceUniqueId;
    }

    public void setDeviceUniqueId(Long deviceUniqueId) {
        this.deviceUniqueId = deviceUniqueId;
    }

    public String getBizUserId() {
        return bizUserId;
    }

    public void setBizUserId(String bizUserId) {
        this.bizUserId = bizUserId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getMsgInfo() {
        return msgInfo;
    }

    public void setMsgInfo(String msgInfo) {
        this.msgInfo = msgInfo;
    }

    public long getLogTime() {
        return logTime;
    }

    public void setLogTime(long logTime) {
        this.logTime = logTime;
    }

    public int getUserRegTime() {
        return userRegTime;
    }

    public void setUserRegTime(int userRegTime) {
        this.userRegTime = userRegTime;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public int getLogDate() {
        return (int)(DateUtil.getDayStartTime(new Date(this.logTime)).getTime()/1000);
    }

    public Long getInviteId() {
        return inviteId;
    }

    public void setInviteId(Long inviteId) {
        this.inviteId = inviteId;
    }
}
